package org.windowkit.toolkit.widget.table.event;

import org.ddevil.data.Data;

/**
 * @author Eric Lundin
 */
public class DataMoveEvent {
	Data myRecord;

	DataMoveType myType;

	public DataMoveEvent(final Data record, final DataMoveType type) {
		myRecord = record;
		myType = type;
	}

	/**
	 * Get the type of move that just occured. Either an ADD or REMOVE.
	 *
	 * @return
	 */
	public DataMoveType getType() {
		return myType;
	}

	/**
	 * Get the {@link Data} object representing the record which was
	 * just added or removed.
	 *
	 * @return The record which was just moved.
	 */
	public Data getMovedRecord() {
		return myRecord;
	}

	public enum DataMoveType {
		ADD, REMOVE
	}
}
